************************************************************************************************************
***Replication Data for "Ethnicity and Response to Internal Environmental Migrants in the United States"****
***Konstantin Ash and Puck Winchester. Forthcoming in Political Research Quarterly.*************************
************************************************************************************************************
#delimit;
clear;
cd "~"; ***Should be directory where replication data is stored****;
use qualtrics_mini_max;

*** Latinx Nationality Statistics for Footnote 7***
tab race;
replace  q85_1=0 if  q85_1==. & latinx==1;
replace  q85_2=0 if  q85_2==. & latinx==1;
replace  q85_3=0 if  q85_3==. & latinx==1;
replace  q85_4=0 if  q85_4==. & latinx==1;
replace  q85_5=0 if  q85_5==. & latinx==1;
replace  q85_6=0 if  q85_6==. & latinx==1;
replace  q85_7=0 if  q85_7==. & latinx==1;
sum  q85_1 q85_2 q85_3 q85_4 q85_5 q85_6  q85_7;
***Mexican: 305/559 = 54.56%;
***Cuban: 35/559 = 6.26%;
***Puerto Rican: 128/559 = 22.90%;
***Dominican: 33/559 = 5.90%;
***Central American: 30/559 = 5.37%;
***South American: 43/559 = 7.69%;
***Other national origin: 31/559 = 5.55%;


*** Figure 2 Underlying Analysis***
#delimit;
ttest q30 if race==1 & treatcode<2 ,by(black_treatment);
ttest q30 if race==1  & treatcode!=1 & treatcode!=3 ,by(latinx_treatment);
ttest q30 if race==1  & treatcode!=1 & treatcode!=2 ,by(white_treatment);

ttest q30 if race==2 & treatcode<2 ,by(black_treatment);
ttest q30 if race==2  & treatcode!=1 & treatcode!=3 ,by(latinx_treatment);
ttest q30 if race==2  & treatcode!=1 & treatcode!=2 ,by(white_treatment);


ttest q30 if race==3 & treatcode<2 ,by(black_treatment);
ttest q30 if race==3  & treatcode!=1 & treatcode!=3 ,by(latinx_treatment);
ttest q30 if race==3  & treatcode!=1 & treatcode!=2 ,by(white_treatment);

***Table 2: Emotions with over 10 Percent (in bold)***
sum  relocation_anger relocation_hatred relocation_contempt relocation_disgust relocation_fear relocation_disappointment relocation_shame relocation_regret relocation_guilt relocation_sadness relocation_compassion relocation_relief relocation_love relocation_admiration relocation_contentment relocation_pleasure relocation_joy relocation_pride relocation_amusement relocation_interest if progress==100;
ttest q30 ,by(relocation_fear) ;
**Less support
ttest q30 ,by(relocation_disappointment);
**less 
ttest q30 ,by(relocation_sadness);
**less 
ttest q30 ,by(relocation_compassion); 
**more
ttest q30 ,by(relocation_relief) ;
**more
ttest q30 ,by(relocation_love) ;
**more
ttest q30 ,by(relocation_admiration); 
**more
ttest q30 ,by(relocation_joy) ;
**more
ttest q30 ,by(relocation_pride); 
**more
ttest q30 ,by(relocation_interest); 
**neutral

****Remaining Emotions ***
ttest q30 ,by(relocation_anger);
ttest q30 ,by(relocation_hatred);
ttest q30 ,by(relocation_contempt);
ttest q30 ,by(relocation_disgust);
ttest q30 ,by(relocation_shame);
ttest q30 ,by(relocation_regret);
ttest q30 ,by(relocation_guilt);
ttest q30 ,by(relocation_contentment);
ttest q30 ,by(relocation_pleasure);
ttest q30 ,by(relocation_amusement);



***Table 3***
#delimit;
sum relocation_fear relocation_disappointment relocation_sadness relocation_compassion relocation_relief relocation_love relocation_admiration relocation_joy relocation_pride relocation_interest if white_control==1;
sum relocation_fear relocation_disappointment relocation_sadness relocation_compassion relocation_relief relocation_love relocation_admiration relocation_joy relocation_pride relocation_interest if black==1 & control==1;
sum relocation_fear relocation_disappointment relocation_sadness relocation_compassion relocation_relief relocation_love relocation_admiration relocation_joy relocation_pride relocation_interest if latinx==1 & control==1;
sum relocation_fear relocation_disappointment relocation_sadness relocation_compassion relocation_relief relocation_love relocation_admiration relocation_joy relocation_pride relocation_interest if white_ingroup==1 & white_treat_latinx==0 & white_treat_black==0 & control==0;
sum relocation_fear relocation_disappointment relocation_sadness relocation_compassion relocation_relief relocation_love relocation_admiration relocation_joy relocation_pride relocation_interest if black_ingroup==1 & black_treat_latinx==0 & black_treat_white==0 & control==0;
sum relocation_fear relocation_disappointment relocation_sadness relocation_compassion relocation_relief relocation_love relocation_admiration relocation_joy relocation_pride relocation_interest if latinx_ingroup==1 & latinx_treat_white==0 & latinx_treat_black==0 & control==0;
sum relocation_fear relocation_disappointment relocation_sadness relocation_compassion relocation_relief relocation_love relocation_admiration relocation_joy relocation_pride relocation_interest if white_treat_latinx==1;
sum relocation_fear relocation_disappointment relocation_sadness relocation_compassion relocation_relief relocation_love relocation_admiration relocation_joy relocation_pride relocation_interest if white_treat_black==1;
sum relocation_fear relocation_disappointment relocation_sadness relocation_compassion relocation_relief relocation_love relocation_admiration relocation_joy relocation_pride relocation_interest if  black_treat_latinx==1;
sum relocation_fear relocation_disappointment relocation_sadness relocation_compassion relocation_relief relocation_love relocation_admiration relocation_joy relocation_pride relocation_interest if black_treat_white==1;
sum relocation_fear relocation_disappointment relocation_sadness relocation_compassion relocation_relief relocation_love relocation_admiration relocation_joy relocation_pride relocation_interest if latinx_treat_black==1;
sum relocation_fear relocation_disappointment relocation_sadness relocation_compassion relocation_relief relocation_love relocation_admiration relocation_joy relocation_pride relocation_interest if latinx_treat_white==1;

***Table 3 Underlying significance tests - in full appendix 6 (Table A14)***
#delimit;
logit relocation_fear black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e1;
logit relocation_disappointment black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e10;
logit relocation_sadness black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e2;
logit relocation_compassion black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e3;
logit relocation_relief black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e4;
logit relocation_love black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e5;
logit relocation_admiration black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e6;
logit relocation_joy  black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e7;
logit relocation_pride black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e8;
logit relocation_interest black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e9;
estout e1 e10 e2 e3 e4 e5 e6 e7 e8 e9 using emotion_relocation.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 



***Table 4***
#delimit;
sum q43_2 q43_3 q43_4 q43_7 if white_ingroup==1;
sum q43_2 q43_3 q43_4 q43_7 if black_treat_white==1;
sum q43_2 q43_3 q43_4 q43_7 if latinx_treat_white==1;

sum q43_2 q43_3 q43_4 q43_7 if black_ingroup==1;
sum q43_2 q43_3 q43_4 q43_7 if white_treat_black==1;
sum q43_2 q43_3 q43_4 q43_7 if latinx_treat_black ==1;

sum q43_2 q43_3 q43_4 q43_7 if latinx_ingroup==1;
sum q43_2 q43_3 q43_4 q43_7 if white_treat_latinx==1;
sum q43_2 q43_3 q43_4 q43_7 if black_treat_latinx==1;

***Table 4 Underlying significance tests, in full in appendix 6 (table A17)****
#delimit;
reg q42_1 black_ingroup latinx_ingroup   white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo q9;
reg q42_1 black_ingroup latinx_ingroup   white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism;
eststo q10;
oprobit q43_2 black latinx  white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white ;
eststo q1;
oprobit q43_2 black latinx  white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo q2;
oprobit q43_3 black latinx  white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white  ;
eststo q3;
oprobit q43_3 black latinx  white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo q4;
oprobit q43_4 black latinx  white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white ;
eststo q5;
oprobit q43_4 black latinx  white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo q6;
oprobit q43_7 black latinx  white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white ;
eststo q7;
oprobit q43_7 black latinx  white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo q8;
estout q9 q10 q1 q2 q3 q4 q5 q6 q7 q8 using q43.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 


*** Figure 4 Underlying Analysis***

#delimit;
ttest ingroup_pride if race==1 & treatcode<2  ,by(black_treatment);
ttest ingroup_pride if race==1  & treatcode!=1 & treatcode!=3  ,by(latinx_treatment);
ttest ingroup_pride if race==1  & treatcode!=1 & treatcode!=2  ,by(white_treatment);

ttest ingroup_pride if race==2 & treatcode<2  ,by(black_treatment);
ttest ingroup_pride if race==2  & treatcode!=1 & treatcode!=3  ,by(latinx_treatment);
ttest ingroup_pride if race==2  & treatcode!=1 & treatcode!=2  ,by(white_treatment);


ttest ingroup_pride if race==3 & treatcode<2  ,by(black_treatment);
ttest ingroup_pride if race==3  & treatcode!=1 & treatcode!=3  ,by(latinx_treatment);
ttest ingroup_pride if race==3  & treatcode!=1 & treatcode!=2  ,by(white_treatment);


*** Figure 5 Underlying Analysis***
#delimit;
ttest tolerance_outgroup if race==1 & treatcode<2  ,by(black_treatment);
ttest tolerance_outgroup if race==1  & treatcode!=1 & treatcode!=3  ,by(latinx_treatment);
ttest tolerance_outgroup if race==1  & treatcode!=1 & treatcode!=2  ,by(white_treatment);

ttest tolerance_outgroup if race==2 & treatcode<2  ,by(black_treatment);
ttest tolerance_outgroup if race==2  & treatcode!=1 & treatcode!=3  ,by(latinx_treatment);
ttest tolerance_outgroup if race==2  & treatcode!=1 & treatcode!=2  ,by(white_treatment);


ttest tolerance_outgroup if race==3 & treatcode<2  ,by(black_treatment);
ttest tolerance_outgroup if race==3  & treatcode!=1 & treatcode!=3  ,by(latinx_treatment);
ttest tolerance_outgroup if race==3  & treatcode!=1 & treatcode!=2  ,by(white_treatment);









*****************;
***APPENDIX******;
*****************;


*********************************;
***Appendix 2: Intent to Treat***;
*********************************;

clear;
use qualtrics_max;

*** Figure A1 Underlying Analysis Full***
#delimit;

ttest q30 if race==1 & treatcode<2 ,by(black_treatment);
ttest q30 if race==1  & treatcode!=1 & treatcode!=3 ,by(latinx_treatment);
ttest q30 if race==1  & treatcode!=1 & treatcode!=2 ,by(white_treatment);

ttest q30 if race==2 & treatcode<2 ,by(black_treatment);
ttest q30 if race==2  & treatcode!=1 & treatcode!=3 ,by(latinx_treatment);
ttest q30 if race==2  & treatcode!=1 & treatcode!=2 ,by(white_treatment);


ttest q30 if race==3 & treatcode<2 ,by(black_treatment);
ttest q30 if race==3  & treatcode!=1 & treatcode!=3 ,by(latinx_treatment);
ttest q30 if race==3  & treatcode!=1 & treatcode!=2 ,by(white_treatment);


*** Figure A2 Underlying Analysis Full***
#delimit;
ttest q32 if race==1 & treatcode<2 ,by(black_treatment);
ttest q32 if race==1  & treatcode!=1 & treatcode!=3 ,by(latinx_treatment);
ttest q32 if race==1  & treatcode!=1 & treatcode!=2 ,by(white_treatment);

ttest q32 if race==2 & treatcode<2 ,by(black_treatment);
ttest q32 if race==2  & treatcode!=1 & treatcode!=3 ,by(latinx_treatment);
ttest q32 if race==2  & treatcode!=1 & treatcode!=2 ,by(white_treatment);


ttest q32 if race==3 & treatcode<2 ,by(black_treatment);
ttest q32 if race==3  & treatcode!=1 & treatcode!=3 ,by(latinx_treatment);
ttest q32 if race==3  & treatcode!=1 & treatcode!=2 ,by(white_treatment);

***Table A1***
#delimit;
logit relocation_fear black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e1;
logit relocation_sadness black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e2;
logit relocation_compassion black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e3;
logit relocation_relief black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e4;
logit relocation_love black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e5;
logit relocation_admiration black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e6;
logit relocation_joy  black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e7;
logit relocation_pride black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e8;
logit relocation_interest black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e9;
estout e1 e2 e3 e4 e5 e6 e7 e8 e9 using emotion_max.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 


***Table A2****
#delimit;
oprobit q43_2 black latinx  white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white ;
eststo q1;
oprobit q43_2 black latinx  white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo q2;
oprobit q43_3 black latinx  white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white  ;
eststo q3;
oprobit q43_3 black latinx  white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo q4;
oprobit q43_4 black latinx  white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white ;
eststo q5;
oprobit q43_4 black latinx  white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo q6;
oprobit q43_7 black latinx  white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white ;
eststo q7;
oprobit q43_7 black latinx  white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo q8;
estout q1 q2 q3 q4 q5 q6 q7 q8 using q43_max.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 


*** Figure A3 Underlying Analysis Full***

#delimit;

ttest ingroup_pride if race==1 & treatcode<2 ,by(black_treatment);
ttest ingroup_pride if race==1  & treatcode!=1 & treatcode!=3 ,by(latinx_treatment);
ttest ingroup_pride if race==1  & treatcode!=1 & treatcode!=2 ,by(white_treatment);

ttest ingroup_pride if race==2 & treatcode<2 ,by(black_treatment);
ttest ingroup_pride if race==2  & treatcode!=1 & treatcode!=3 ,by(latinx_treatment);
ttest ingroup_pride if race==2  & treatcode!=1 & treatcode!=2 ,by(white_treatment);


ttest ingroup_pride if race==3 & treatcode<2 ,by(black_treatment);
ttest ingroup_pride if race==3  & treatcode!=1 & treatcode!=3 ,by(latinx_treatment);
ttest ingroup_pride if race==3  & treatcode!=1 & treatcode!=2 ,by(white_treatment);


*** Figure A4 Underlying Analysis Full***
#delimit;

ttest tolerance_outgroup if race==1 & treatcode<2  ,by(black_treatment);
ttest tolerance_outgroup if race==1  & treatcode!=1 & treatcode!=3 ,by(latinx_treatment);
ttest tolerance_outgroup if race==1  & treatcode!=1 & treatcode!=2 ,by(white_treatment);

ttest tolerance_outgroup if race==2 & treatcode<2 ,by(black_treatment);
ttest tolerance_outgroup if race==2  & treatcode!=1 & treatcode!=3 ,by(latinx_treatment);
ttest tolerance_outgroup if race==2  & treatcode!=1 & treatcode!=2 ,by(white_treatment);

ttest tolerance_outgroup if race==3 & treatcode<2 ,by(black_treatment);
ttest tolerance_outgroup if race==3  & treatcode!=1 & treatcode!=3 ,by(latinx_treatment);
ttest tolerance_outgroup if race==3  & treatcode!=1 & treatcode!=2 ,by(white_treatment);


***Table A3 Descriptive Statistics***
#delimit;
clear;
use qualtrics_mini_max;
tab race;
tab race, sum(q1);
tab race, sum(q2);
tab race, sum(q5);
tab race, sum(college);
tab race, sum(south);
tab race, sum(married);
tab race, sum(q10);
tab race, sum(voted);
tab race, sum(q15);
tab race, sum(deprivation);
tab race, sum(q19);
tab race, sum(q22);
tab race, sum(altruism);


****Table A4 Balance Tests****
#delimit;
logit black_treatment q1 q2 q5 college south married q10 voted q15 deprivation q19 q22 altruism if  treatcode!=2 & treatcode!=3; 
eststo bal1; 
logit latinx_treatment q1 q2 q5 college south married q10 voted q15 deprivation q19 q22 altruism if  treatcode!=1 & treatcode!=3 ;
eststo bal2;
logit white_treatment q1 q2 q5 college south married q10 voted q15 deprivation q19 q22 altruism if  treatcode!=1 & treatcode!=2;
eststo bal3;
estout bal1 bal2 bal3 using balance.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 


*****Table A5 Verification of Photoshopped Images*******
#delimit;
clear;
use photoshop_id_mturk1;
sum birthyear, d;
tab gender;
tab race;
tab education;
*****Tables A6 and A7 Identification of Photographed Respondents****
tab blackphotoshop;
tab hispanicphotoshop;
tab whitephotoshop;
tab umbrella;
tab family;
tab volcano;
tab northkorea;
*****Table A8 Identification of Ethnicity of Photographed Respondents****
tab black_id;
tab hispanic_id;
tab white_id;
*****Table A9 Identification of Original Image****
tab realphotoshop;

******** Code to Replicate Factor Analysis: Tables A10, A11, A12   ***********
#delimit;
clear;
use qualtrics_mini_max;
drop altruism;
factor    q23_1 q23_2 q23_3 q23_4 q23_5 , pcf;
rotate; 
predict altruism;

#delimit;
drop ingroup_pride tolerance_outgroup;
factor    q66_1 q66_2 q66_3 q66_4 q66_5 q66_6 q66_7 q66_8 q66_9, pcf;
rotate;
predict  ingroup_pride tolerance_outgroup;
replace tolerance_outgroup=-tolerance_outgroup

#delimit;
drop deprivation;
factor q16 q17;
rotate;
predict deprivation;


*****Table A13: Multivariate Results from Figures 2-5 in the main article incluing control variables****
#delimit;
oprobit q30 black latinx white_ingroup black_ingroup latinx_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white ;
eststo q1;
oprobit q30  black latinx white_ingroup black_ingroup latinx_ingroup   white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo q2;
reg  ingroup_pride black latinx white_ingroup black_ingroup latinx_ingroup    white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white, robust ;
eststo q5;
reg  ingroup_pride black latinx white_ingroup black_ingroup latinx_ingroup    white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism, robust ;
eststo q6;
reg tolerance black latinx white_ingroup black_ingroup latinx_ingroup    white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white,robust ;
eststo q7;
reg tolerance black latinx white_ingroup black_ingroup latinx_ingroup    white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism,robust ;
eststo q8;
estout q1 q2 q5 q6 q7 q8 using full_controls.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 

***Table A15: Results for Table 4 in Main Article With Controls
#delimit;
logit relocation_fear black latinx white_control latinx_ingroup black_ingroup  white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo e1;
logit relocation_disappointment black latinx white_control latinx_ingroup black_ingroup  white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo e10;
logit relocation_sadness black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo e2;
logit relocation_compassion black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo e3;
logit relocation_relief black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo e4;
logit relocation_love black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo e5;
logit relocation_admiration black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo e6;
logit relocation_joy  black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo e7;
logit relocation_pride black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo e8;
logit relocation_interest black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo e9;
estout e1 e10 e2 e3 e4 e5 e6 e7 e8 e9 using emotion_controls.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 

****Table A16: Additional Emotions Expressed by under 10 percent of respondents****
#delimit;
logit relocation_anger black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e10;
logit relocation_hatred black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e20;
logit relocation_contempt black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e12;
logit relocation_disgust black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e13;
logit relocation_guilt black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e14;
logit relocation_shame black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e15;
logit relocation_regret black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e16;
logit relocation_contentment  black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e17;
logit relocation_pleasure black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e18;
logit relocation_amusement black latinx white_control latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e19;
estout e10 e20 e12 e13 e14 e15 e16 e17 e18 e19 using emotion_relocation_rest.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 



****Table A18: Perception of having voted for Donald Trump Across Ethnic Groups
#delimit;

tab race if treatcode==1, sum(q43_6);
tab race if treatcode==2, sum(q43_6);
tab race if treatcode==3, sum(q43_6);

***Table A19 Emotional Responses to Disaster****
#delimit;
sum  disaster_anger disaster_hatred disaster_contempt disaster_disgust disaster_fear disaster_disappointment disaster_shame disaster_regret disaster_guilt disaster_sadness disaster_compassion disaster_relief disaster_love disaster_admiration disaster_contentment disaster_pleasure disaster_joy disaster_pride disaster_amusement disaster_interest;
ttest  donation,by(disaster_anger);
ttest  donation,by(disaster_fear);
ttest  donation,by(disaster_disappointment);
ttest  donation,by(disaster_guilt);
ttest  donation,by(disaster_sadness);
ttest  donation,by(disaster_compassion);
ttest  donation,by(disaster_love);
ttest  donation,by(disaster_interest);
ttest  donation,by(disaster_hatred);
ttest  donation,by(disaster_contempt);
ttest  donation,by(disaster_disgust);
ttest  donation,by(disaster_shame);
ttest  donation,by(disaster_regret);
ttest  donation,by(disaster_relief);
ttest  donation,by(disaster_joy);
ttest  donation,by(disaster_contentment);
ttest  donation,by(disaster_amusement);
ttest  donation,by(disaster_pleasure);
ttest  donation,by(disaster_pride);
ttest  donation,by(disaster_admiration);

***Table A20: Emotional Responses to Disaster***

#delimit;
logit disaster_anger black latinx white_ingroup black_ingroup latinx_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo e1;
logit disaster_fear black latinx white_ingroup black_ingroup latinx_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white ;
eststo e2;
logit disaster_disappointment black latinx white_ingroup black_ingroup latinx_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white ;
eststo e3;
logit disaster_guilt black latinx white_ingroup black_ingroup latinx_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white ;
eststo e4;
logit disaster_sadness black latinx white_ingroup black_ingroup latinx_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white ;
eststo e5;
logit disaster_compassion black latinx white_ingroup black_ingroup latinx_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white ;
eststo e6;
logit disaster_love  black latinx white_ingroup black_ingroup latinx_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white ;
eststo e7;
logit disaster_interest black latinx white_ingroup black_ingroup latinx_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white ;
eststo e8;
estout e1 e2 e3 e4 e5 e6 e7 e8  using emotion_disaster.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 

***Table A21: Donations to Victims***

#delimit;
tab q5,sum(donation);
tab q5 if donation<1001,sum(donation);
tab q5 if donation<5001,sum(donation);
reg donation black latinx white_ingroup black_ingroup latinx_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo don1;
reg donation black latinx white_ingroup black_ingroup latinx_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white if donation<1001;
eststo don2;
reg donation black latinx white_ingroup black_ingroup latinx_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white if donation<5001;
eststo don3;
oprobit q26 black latinx white_ingroup black_ingroup latinx_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo gov;
oprobit q27 black latinx white_ingroup black_ingroup latinx_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white;
eststo local;
estout don1 don2 don3 gov local using donation.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 

*** Volunteer Time Underlying Analysis: Figure A7 Underlying Analysis and Table A22***
#delimit;

ttest q32 if race==1 & treatcode<2 ,by(black_treatment);
ttest q32 if race==1  & treatcode!=1 & treatcode!=3 ,by(latinx_treatment);
ttest q32 if race==1  & treatcode!=1 & treatcode!=2 ,by(white_treatment);

ttest q32 if race==2 & treatcode<2 ,by(black_treatment);
ttest q32 if race==2  & treatcode!=1 & treatcode!=3 ,by(latinx_treatment);
ttest q32 if race==2  & treatcode!=1 & treatcode!=2 ,by(white_treatment);


ttest q32 if race==3 & treatcode<2 ,by(black_treatment);
ttest q32 if race==3  & treatcode!=1 & treatcode!=3 ,by(latinx_treatment);
ttest q32 if race==3  & treatcode!=1 & treatcode!=2 ,by(white_treatment);

#delimit;
oprobit q32 black latinx white_ingroup black_ingroup latinx_ingroup   white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white  ;
eststo q3;
oprobit q32 black latinx white_ingroup black_ingroup latinx_ingroup   white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;
eststo q4;
estout q3 q4 using donation_time.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 







****Testing the Contact Hypothesis as a Mediating Effect***
#delimit;
gen contact=.;
replace contact= cepctblack5k if treatcode==1;
replace contact= cepcthispa5k if treatcode==2;
replace contact= cepctwhite5k if treatcode==3;
#delimit;
gen black_contact= black*contact;
gen latinx_contact= latinx*contact; 
gen white_treat_latinx_contact = white_treat_latinx*contact;
gen white_treat_black_contact = white_treat_black*contact;
gen black_treat_latinx_contact=black_treat_latinx*contact;
gen black_treat_white_contact =black_treat_white*contact;
gen latinx_treat_black_contact=latinx_treat_black*contact;
gen latinx_treat_white_contact=latinx_treat_white*contact; 


***Table A23***
#delimit;
xi: oprobit q30 black black_contact latinx latinx_contact white_treat_latinx white_treat_latinx_contact white_treat_black white_treat_black_contact black_treat_latinx black_treat_latinx_contact black_treat_white black_treat_white_contact latinx_treat_black latinx_treat_black_contact latinx_treat_white latinx_treat_white_contact q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ; 
eststo c1;
xi: oprobit q32 black black_contact latinx latinx_contact white_treat_latinx white_treat_latinx_contact white_treat_black white_treat_black_contact black_treat_latinx black_treat_latinx_contact black_treat_white black_treat_white_contact latinx_treat_black latinx_treat_black_contact latinx_treat_white latinx_treat_white_contact q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ; 
eststo c2;
xi: oprobit q43_2 black black_contact latinx latinx_contact white_treat_latinx white_treat_latinx_contact white_treat_black white_treat_black_contact black_treat_latinx black_treat_latinx_contact black_treat_white black_treat_white_contact latinx_treat_black latinx_treat_black_contact latinx_treat_white latinx_treat_white_contact q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism  ;
eststo c3;
xi: oprobit q43_3 black black_contact latinx latinx_contact white_treat_latinx white_treat_latinx_contact white_treat_black white_treat_black_contact black_treat_latinx black_treat_latinx_contact black_treat_white black_treat_white_contact latinx_treat_black latinx_treat_black_contact latinx_treat_white latinx_treat_white_contact q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism  ;
eststo c4;
xi: oprobit q43_4 black black_contact latinx latinx_contact white_treat_latinx white_treat_latinx_contact white_treat_black white_treat_black_contact black_treat_latinx black_treat_latinx_contact black_treat_white black_treat_white_contact latinx_treat_black latinx_treat_black_contact latinx_treat_white latinx_treat_white_contact q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;  
eststo c5;
xi: oprobit q43_7 black black_contact latinx latinx_contact white_treat_latinx white_treat_latinx_contact white_treat_black white_treat_black_contact black_treat_latinx black_treat_latinx_contact black_treat_white black_treat_white_contact latinx_treat_black latinx_treat_black_contact latinx_treat_white latinx_treat_white_contact q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;  
eststo c6;
xi: reg ingroup_p black black_contact latinx latinx_contact white_treat_latinx white_treat_latinx_contact white_treat_black white_treat_black_contact black_treat_latinx black_treat_latinx_contact black_treat_white black_treat_white_contact latinx_treat_black latinx_treat_black_contact latinx_treat_white latinx_treat_white_contact q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;  
eststo c7;
xi: reg tolerance black black_contact latinx latinx_contact white_treat_latinx white_treat_latinx_contact white_treat_black white_treat_black_contact black_treat_latinx black_treat_latinx_contact black_treat_white black_treat_white_contact latinx_treat_black latinx_treat_black_contact latinx_treat_white latinx_treat_white_contact q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism ;  
eststo c8;
estout c1 c2 c3 c4 c5 c6 c7 c8 using contact.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 

***Table A24***
#delimit;
logit relocation_fear black black_contact latinx latinx_contact white_treat_latinx white_treat_latinx_contact white_treat_black white_treat_black_contact black_treat_latinx black_treat_latinx_contact black_treat_white black_treat_white_contact latinx_treat_black latinx_treat_black_contact latinx_treat_white latinx_treat_white_contact q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism  if control==0;
eststo e1;
logit relocation_disappointment black black_contact latinx latinx_contact white_treat_latinx white_treat_latinx_contact white_treat_black white_treat_black_contact black_treat_latinx black_treat_latinx_contact black_treat_white black_treat_white_contact latinx_treat_black latinx_treat_black_contact latinx_treat_white latinx_treat_white_contact q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism  if control==0;
eststo e10;
logit relocation_sadness black black_contact latinx latinx_contact white_treat_latinx white_treat_latinx_contact white_treat_black white_treat_black_contact black_treat_latinx black_treat_latinx_contact black_treat_white black_treat_white_contact latinx_treat_black latinx_treat_black_contact latinx_treat_white latinx_treat_white_contact q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism  if control==0;
eststo e2;
logit relocation_compassion black black_contact latinx latinx_contact white_treat_latinx white_treat_latinx_contact white_treat_black white_treat_black_contact black_treat_latinx black_treat_latinx_contact black_treat_white black_treat_white_contact latinx_treat_black latinx_treat_black_contact latinx_treat_white latinx_treat_white_contact q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism  if control==0;
eststo e3;
logit relocation_relief black black_contact latinx latinx_contact white_treat_latinx white_treat_latinx_contact white_treat_black white_treat_black_contact black_treat_latinx black_treat_latinx_contact black_treat_white black_treat_white_contact latinx_treat_black latinx_treat_black_contact latinx_treat_white latinx_treat_white_contact  q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism  if control==0;
eststo e4;
logit relocation_love black black_contact latinx latinx_contact white_treat_latinx white_treat_latinx_contact white_treat_black white_treat_black_contact black_treat_latinx black_treat_latinx_contact black_treat_white black_treat_white_contact latinx_treat_black latinx_treat_black_contact latinx_treat_white latinx_treat_white_contact q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism  if control==0;
eststo e5;
logit relocation_admiration black black_contact latinx latinx_contact white_treat_latinx white_treat_latinx_contact white_treat_black white_treat_black_contact black_treat_latinx black_treat_latinx_contact black_treat_white black_treat_white_contact latinx_treat_black latinx_treat_black_contact latinx_treat_white latinx_treat_white_contact q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism  if control==0; 
eststo e6;
logit relocation_joy  black black_contact latinx latinx_contact white_treat_latinx white_treat_latinx_contact white_treat_black white_treat_black_contact black_treat_latinx black_treat_latinx_contact black_treat_white black_treat_white_contact latinx_treat_black latinx_treat_black_contact latinx_treat_white latinx_treat_white_contact q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism  if control==0;
eststo e7;
logit relocation_pride black black_contact latinx latinx_contact white_treat_latinx white_treat_latinx_contact white_treat_black white_treat_black_contact black_treat_latinx black_treat_latinx_contact black_treat_white black_treat_white_contact latinx_treat_black latinx_treat_black_contact latinx_treat_white latinx_treat_white_contact q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism  if control==0;
eststo e8;
logit relocation_interest black black_contact latinx latinx_contact white_treat_latinx white_treat_latinx_contact white_treat_black white_treat_black_contact black_treat_latinx black_treat_latinx_contact black_treat_white black_treat_white_contact latinx_treat_black latinx_treat_black_contact latinx_treat_white latinx_treat_white_contact q1 q2 q5 college south q10 voted q15 deprivation q19 q22 altruism  if control==0; 
eststo e9;
estout e1 e10 e2 e3 e4 e5 e6 e7 e8 e9 using emotion_contact.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 


****Testing the 2016 Prez Vote as a Mediating Effect***

#delimit;
gen black_clinton= black*clinton;
gen latinx_clinton= latinx*clinton; 

gen white_treat_latinx_clinton= white_treat_latinx*clinton;
gen white_treat_black_clinton= white_treat_black*clinton;
gen black_treat_latinx_clinton=black_treat_latinx*clinton;
gen black_treat_white_clinton=black_treat_white*clinton;
gen latinx_treat_black_clinton=latinx_treat_black*clinton;
gen latinx_treat_white_clinton=latinx_treat_white*clinton; 
gen black_trump= black*trump;
gen latinx_trump= latinx*trump; 

gen white_treat_latinx_trump= white_treat_latinx*trump;
gen white_treat_black_trump= white_treat_black*trump;
gen black_treat_latinx_trump=black_treat_latinx*trump;
gen black_treat_white_trump=black_treat_white*trump;
gen latinx_treat_black_trump=latinx_treat_black*trump;
gen latinx_treat_white_trump=latinx_treat_white*trump; 
#delimit;
gen white_ingroup_clinton=white_ingroup*clinton;
gen black_ingroup_clinton=black_ingroup*clinton;
gen latinx_ingroup_clinton=latinx_ingroup*clinton;
gen white_ingroup_trump=white_ingroup*trump;
gen black_ingroup_trump=black_ingroup*trump;
gen latinx_ingroup_trump=latinx_ingroup*trump;

***Table A25***

#delimit;
xi: oprobit q30 trump clinton black latinx white_ingroup white_ingroup_clinton white_ingroup_trump black_ingroup  latinx_ingroup  white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_clinton black_treat_white_trump latinx_treat_black latinx_treat_white latinx_treat_white_clinton latinx_treat_white_trump; 
eststo c1;
xi: oprobit q32 trump clinton black latinx white_ingroup white_ingroup_clinton white_ingroup_trump black_ingroup  latinx_ingroup  white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_clinton black_treat_white_trump latinx_treat_black latinx_treat_white  latinx_treat_white_clinton latinx_treat_white_trump; 
eststo c2;
xi: oprobit q43_2 trump clinton black latinx white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_clinton black_treat_white_trump latinx_treat_black latinx_treat_white  latinx_treat_white_clinton latinx_treat_white_trump; 
eststo c3;
xi: oprobit q43_3 trump clinton black latinx white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_clinton black_treat_white_trump latinx_treat_black latinx_treat_white  latinx_treat_white_clinton latinx_treat_white_trump; 
eststo c4;
xi: oprobit q43_4 trump clinton black latinx white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_clinton black_treat_white_trump latinx_treat_black latinx_treat_white latinx_treat_white_clinton latinx_treat_white_trump ; 
eststo c5;
xi: oprobit q43_7 trump clinton black latinx white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_clinton black_treat_white_trump latinx_treat_black latinx_treat_white latinx_treat_white_clinton latinx_treat_white_trump ; 
eststo c6;
xi: reg ingroup_p trump clinton black latinx white_ingroup white_ingroup_clinton white_ingroup_trump black_ingroup  latinx_ingroup  white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_clinton black_treat_white_trump latinx_treat_black latinx_treat_white  latinx_treat_white_clinton latinx_treat_white_trump; 
eststo c7;
xi: reg tolerance trump clinton black latinx white_ingroup white_ingroup_clinton white_ingroup_trump black_ingroup  latinx_ingroup  white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_clinton black_treat_white_trump latinx_treat_black latinx_treat_white latinx_treat_white_clinton latinx_treat_white_trump ; 
eststo c8;
estout c1 c2 c3 c4 c5 c6 c7 c8 using 2016vote.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 

***Table A26***

#delimit;
logit relocation_fear trump clinton black latinx white_ingroup white_ingroup_clinton white_ingroup_trump black_ingroup  latinx_ingroup  white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_clinton black_treat_white_trump latinx_treat_black latinx_treat_white latinx_treat_white_clinton latinx_treat_white_trump; 
eststo  e1;
logit relocation_disappointment trump clinton black latinx white_ingroup white_ingroup_clinton white_ingroup_trump black_ingroup  latinx_ingroup  white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_clinton black_treat_white_trump latinx_treat_black latinx_treat_white latinx_treat_white_clinton latinx_treat_white_trump; 
eststo  e10;
logit relocation_sadness trump clinton black latinx white_ingroup white_ingroup_clinton white_ingroup_trump black_ingroup  latinx_ingroup  white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_clinton black_treat_white_trump latinx_treat_black latinx_treat_white latinx_treat_white_clinton latinx_treat_white_trump; 
eststo  e2;
logit relocation_compassion trump clinton black latinx white_ingroup white_ingroup_clinton white_ingroup_trump black_ingroup  latinx_ingroup  white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_clinton black_treat_white_trump latinx_treat_black latinx_treat_white latinx_treat_white_clinton latinx_treat_white_trump; 
eststo  e3;
logit relocation_relief trump clinton black latinx white_ingroup white_ingroup_clinton white_ingroup_trump black_ingroup  latinx_ingroup  white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_clinton black_treat_white_trump latinx_treat_black latinx_treat_white latinx_treat_white_clinton latinx_treat_white_trump; 
eststo  e4;
logit relocation_love trump clinton black latinx white_ingroup white_ingroup_clinton white_ingroup_trump black_ingroup  latinx_ingroup  white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_clinton black_treat_white_trump latinx_treat_black latinx_treat_white latinx_treat_white_clinton latinx_treat_white_trump; 
eststo  e5;
logit relocation_admiration trump clinton black latinx white_ingroup white_ingroup_clinton white_ingroup_trump black_ingroup  latinx_ingroup  white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_clinton black_treat_white_trump latinx_treat_black latinx_treat_white latinx_treat_white_clinton latinx_treat_white_trump; 
eststo  e6;
logit relocation_joy trump clinton black latinx white_ingroup white_ingroup_clinton white_ingroup_trump black_ingroup  latinx_ingroup  white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_clinton black_treat_white_trump latinx_treat_black latinx_treat_white latinx_treat_white_clinton latinx_treat_white_trump; 
eststo  e7;
logit relocation_pride trump clinton black latinx white_ingroup white_ingroup_clinton white_ingroup_trump black_ingroup  latinx_ingroup  white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_clinton black_treat_white_trump latinx_treat_black latinx_treat_white latinx_treat_white_clinton latinx_treat_white_trump ; 
eststo  e8;
logit relocation_interest trump clinton black latinx white_ingroup white_ingroup_clinton white_ingroup_trump black_ingroup  latinx_ingroup  white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_clinton black_treat_white_trump latinx_treat_black latinx_treat_white latinx_treat_white_clinton latinx_treat_white_trump; 
eststo  e9;
estout e1 e10 e2 e3 e4 e5 e6 e7 e8 e9 using 2016vote_emotion.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 


****White Southerners as Mediating Effect****

#delimit;
gen white_ingroup_south = white_ingroup*south;
gen black_treat_white_south =black_treat_white*south;
gen latinx_treat_white_south=latinx_treat_white*south; 

***Table A27***

#delimit;
xi: oprobit q30 south black latinx white_ingroup white_ingroup_south black_ingroup  latinx_ingroup  white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_south latinx_treat_black latinx_treat_white latinx_treat_white_south; 
eststo r1;
xi: oprobit q32 south black latinx white_ingroup white_ingroup_south black_ingroup  latinx_ingroup  white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_south latinx_treat_black latinx_treat_white latinx_treat_white_south; 
eststo r2;
xi: oprobit q43_2 south black latinx white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_south latinx_treat_black latinx_treat_white latinx_treat_white_south; 
eststo r3;
xi: oprobit q43_3 south black latinx white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_south latinx_treat_black latinx_treat_white latinx_treat_white_south; 
eststo r4;
xi: oprobit q43_4 south black latinx white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_south latinx_treat_black latinx_treat_white latinx_treat_white_south; 
eststo r5;
xi: oprobit q43_5 south black latinx white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_south latinx_treat_black latinx_treat_white latinx_treat_white_south; 
eststo r6;
xi: reg ingroup_p south black latinx white_ingroup white_ingroup_south black_ingroup  latinx_ingroup  white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_south latinx_treat_black latinx_treat_white latinx_treat_white_south; 
eststo r7;
xi: reg tolerance south black latinx white_ingroup white_ingroup_south black_ingroup  latinx_ingroup  white_treat_latinx  white_treat_black black_treat_latinx  black_treat_white black_treat_white_south latinx_treat_black latinx_treat_white latinx_treat_white_south; 
eststo r8;
estout r1 r2 r3 r4 r5 r6 r7 r8  using south.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 

***Table A28***
#delimit;
logit relocation_fear black latinx white_ingroup white_ingroup_south latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white  south black_treat_white_south latinx_treat_white_south;
eststo s1;
logit relocation_disappointment black latinx white_ingroup white_ingroup_south latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white  south black_treat_white_south latinx_treat_white_south;
eststo s10;
logit relocation_sadness black latinx white_ingroup white_ingroup_south latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white  south black_treat_white_south latinx_treat_white_south;
eststo s2;
logit relocation_compassion black latinx white_ingroup white_ingroup_south latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white  south black_treat_white_south latinx_treat_white_south;
eststo s3;
logit relocation_relief black latinx white_ingroup white_ingroup_south latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white  south black_treat_white_south latinx_treat_white_south;
eststo s4;
logit relocation_love black latinx white_ingroup white_ingroup_south latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white  south black_treat_white_south latinx_treat_white_south;
eststo s5;
logit relocation_admiration black latinx white_ingroup white_ingroup_south latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white  south black_treat_white_south latinx_treat_white_south;
eststo s6;
logit relocation_joy  black latinx white_ingroup white_ingroup_south latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white  south black_treat_white_south latinx_treat_white_south;
eststo s7;
logit relocation_pride black latinx white_ingroup white_ingroup_south latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white  south black_treat_white_south latinx_treat_white_south;
eststo s8;
logit relocation_interest black latinx white_ingroup white_ingroup_south latinx_ingroup black_ingroup white_treat_latinx white_treat_black black_treat_latinx black_treat_white latinx_treat_black latinx_treat_white  south black_treat_white_south latinx_treat_white_south;
eststo s9;
estout s1 s10 s2 s3 s4 s5 s6 s7 s8 s9  using emotion_relocation_south.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 

*****Interaction of Mexican American Heritage and Treatment for Latinx Respondents****

#delimit;
gen mexican=.;
replace mexican=0 if latinx==1;
replace mexican=1 if q85_1==1;

tab  q85_1 if  q85_2!=0 |  q85_3!=0  |  q85_4!=0 |  q85_5!=0 | q85_6!=0 |  q85_7!=0;
tab  q85_3 if  q85_2!=0 |  q85_1!=0  |  q85_4!=0 |  q85_5!=0 | q85_6!=0 |  q85_7!=0;


#delimit;
gen latinx_ingroup_mexican = latinx_ingroup*mexican;
gen black_treat_latinx_mexican =black_treat_latinx*mexican;
gen white_treat_latinx_mexican=white_treat_latinx*mexican;

***Table A29***

 #delimit;
xi: oprobit q30 latinx_ingroup mexican white_treat_latinx  black_treat_latinx  latinx_ingroup_mexican black_treat_latinx_mexican white_treat_latinx_mexican; 
eststo m1;
xi: oprobit q32 latinx_ingroup mexican white_treat_latinx  black_treat_latinx  latinx_ingroup_mexican black_treat_latinx_mexican white_treat_latinx_mexican; 
eststo m2;
xi: oprobit q43_2 mexican white_treat_latinx  black_treat_latinx  black_treat_latinx_mexican white_treat_latinx_mexican; 
eststo m3;
xi: oprobit q43_3 mexican white_treat_latinx  black_treat_latinx  black_treat_latinx_mexican white_treat_latinx_mexican; 
eststo m4;
xi: oprobit q43_4 mexican white_treat_latinx  black_treat_latinx  black_treat_latinx_mexican white_treat_latinx_mexican; 
eststo m5;
xi: oprobit q43_5 mexican white_treat_latinx  black_treat_latinx  black_treat_latinx_mexican white_treat_latinx_mexican; 
eststo m6;
xi: reg ingroup_p latinx_ingroup mexican white_treat_latinx  black_treat_latinx  latinx_ingroup_mexican black_treat_latinx_mexican white_treat_latinx_mexican; 
eststo m7;
xi: reg tolerance latinx_ingroup mexican white_treat_latinx  black_treat_latinx  latinx_ingroup_mexican black_treat_latinx_mexican white_treat_latinx_mexican; 
eststo m8;
estout m1 m2 m3 m4 m5 m6 m7 m8 using mexican.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 

***Table A30***

#delimit;
logit relocation_fear latinx_ingroup mexican white_treat_latinx  black_treat_latinx  latinx_ingroup_mexican black_treat_latinx_mexican white_treat_latinx_mexican;
eststo x1;
logit relocation_disappointment latinx_ingroup mexican white_treat_latinx  black_treat_latinx  latinx_ingroup_mexican black_treat_latinx_mexican white_treat_latinx_mexican;
eststo x10;
logit relocation_sadness latinx_ingroup mexican white_treat_latinx  black_treat_latinx  latinx_ingroup_mexican black_treat_latinx_mexican white_treat_latinx_mexican;
eststo x2;
logit relocation_compassion latinx_ingroup mexican white_treat_latinx  black_treat_latinx  latinx_ingroup_mexican black_treat_latinx_mexican white_treat_latinx_mexican;
eststo x3;
logit relocation_relief latinx_ingroup mexican white_treat_latinx  black_treat_latinx  latinx_ingroup_mexican black_treat_latinx_mexican white_treat_latinx_mexican;
eststo x4;
logit relocation_love latinx_ingroup mexican white_treat_latinx  black_treat_latinx  latinx_ingroup_mexican black_treat_latinx_mexican white_treat_latinx_mexican;
eststo x5;
logit relocation_admiration latinx_ingroup mexican white_treat_latinx  black_treat_latinx  latinx_ingroup_mexican black_treat_latinx_mexican white_treat_latinx_mexican;
eststo x6;
logit relocation_joy  latinx_ingroup mexican white_treat_latinx  black_treat_latinx  latinx_ingroup_mexican black_treat_latinx_mexican white_treat_latinx_mexican;
eststo x7;
logit relocation_pride latinx_ingroup mexican white_treat_latinx  black_treat_latinx  latinx_ingroup_mexican black_treat_latinx_mexican white_treat_latinx_mexican;
eststo x8;
logit relocation_interest latinx_ingroup mexican white_treat_latinx  black_treat_latinx  latinx_ingroup_mexican black_treat_latinx_mexican white_treat_latinx_mexican;
eststo x9;
estout x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 using emotion_relocation_mexican.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 


****Mexican Border States Heterogeneous Treatment Effects***
#delimit;
gen border=0;
replace border=1 if state=="California" |state=="New Mexico" | state=="Arizona" | state=="Texas";

#delimit;
gen black_border=black*border;
gen latinx_border=latinx*border;
gen latinx_ingroup_border= latinx_ingroup*border;
gen black_treat_latinx_border=black_treat_latinx*border;
gen white_treat_latinx_border=white_treat_latinx*border;
gen white_ingroup_border= white_ingroup*border;
gen black_treat_white_border=black_treat_white*border;
gen latinx_treat_white_border=latinx_treat_white*border;
gen black_ingroup_border= black_ingroup*border;
gen latinx_treat_black_border=latinx_treat_black*border;
gen white_treat_black_border=white_treat_black*border;
    
***Table A31***

#delimit;
xi: oprobit q30 border black latinx black_border latinx_border white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_border white_ingroup_border black_ingroup_border   white_treat_latinx white_treat_latinx_border   white_treat_black white_treat_black_border black_treat_latinx black_treat_latinx_border  black_treat_white black_treat_white_border latinx_treat_black latinx_treat_black_border  latinx_treat_white latinx_treat_white_border ; 
eststo bor1;
xi: oprobit q32 border black latinx black_border latinx_border white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_border white_ingroup_border black_ingroup_border   white_treat_latinx white_treat_latinx_border   white_treat_black white_treat_black_border black_treat_latinx black_treat_latinx_border  black_treat_white black_treat_white_border latinx_treat_black latinx_treat_black_border  latinx_treat_white latinx_treat_white_border ; 
eststo bor2;
xi: oprobit q43_2 border black_ingroup latinx_ingroup latinx_ingroup_border white_ingroup_border black_ingroup_border white_treat_latinx white_treat_latinx_border   white_treat_black white_treat_black_border black_treat_latinx black_treat_latinx_border  black_treat_white black_treat_white_border latinx_treat_black latinx_treat_black_border  latinx_treat_white latinx_treat_white_border ; 
eststo bor3;
xi: oprobit q43_3 border black_ingroup latinx_ingroup latinx_ingroup_border white_ingroup_border black_ingroup_border white_treat_latinx white_treat_latinx_border   white_treat_black white_treat_black_border black_treat_latinx black_treat_latinx_border  black_treat_white black_treat_white_border latinx_treat_black latinx_treat_black_border  latinx_treat_white latinx_treat_white_border ; 
eststo bor4;
xi: oprobit q43_4 border black_ingroup latinx_ingroup latinx_ingroup_border white_ingroup_border black_ingroup_border white_treat_latinx white_treat_latinx_border   white_treat_black white_treat_black_border black_treat_latinx black_treat_latinx_border  black_treat_white black_treat_white_border latinx_treat_black latinx_treat_black_border  latinx_treat_white latinx_treat_white_border ; 
eststo bor5;
xi: oprobit q43_5 border black_ingroup latinx_ingroup latinx_ingroup_border white_ingroup_border black_ingroup_border white_treat_latinx white_treat_latinx_border   white_treat_black white_treat_black_border black_treat_latinx black_treat_latinx_border  black_treat_white black_treat_white_border latinx_treat_black latinx_treat_black_border  latinx_treat_white latinx_treat_white_border ; 
eststo bor6;
xi: reg ingroup_p border black latinx black_border latinx_border white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_border white_ingroup_border black_ingroup_border   white_treat_latinx white_treat_latinx_border   white_treat_black white_treat_black_border black_treat_latinx black_treat_latinx_border  black_treat_white black_treat_white_border latinx_treat_black latinx_treat_black_border  latinx_treat_white latinx_treat_white_border ; 
eststo bor7;
xi: reg tolerance border black latinx black_border latinx_border white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_border white_ingroup_border black_ingroup_border   white_treat_latinx white_treat_latinx_border   white_treat_black white_treat_black_border black_treat_latinx black_treat_latinx_border  black_treat_white black_treat_white_border latinx_treat_black latinx_treat_black_border  latinx_treat_white latinx_treat_white_border ; 
eststo bor8;
estout bor1 bor2 bor3 bor4 bor5 bor6 bor7 bor8  using border.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 

***Table A32***

#delimit;
logit relocation_fear border black latinx black_border latinx_border white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_border white_ingroup_border black_ingroup_border   white_treat_latinx white_treat_latinx_border   white_treat_black white_treat_black_border black_treat_latinx black_treat_latinx_border  black_treat_white black_treat_white_border latinx_treat_black latinx_treat_black_border  latinx_treat_white latinx_treat_white_border ;
eststo bos1;
logit relocation_disappointment border black latinx black_border latinx_border white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_border white_ingroup_border black_ingroup_border   white_treat_latinx white_treat_latinx_border   white_treat_black white_treat_black_border black_treat_latinx black_treat_latinx_border  black_treat_white black_treat_white_border latinx_treat_black latinx_treat_black_border  latinx_treat_white latinx_treat_white_border ;
eststo bos10;
logit relocation_sadness border black latinx black_border latinx_border white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_border white_ingroup_border black_ingroup_border   white_treat_latinx white_treat_latinx_border   white_treat_black white_treat_black_border black_treat_latinx black_treat_latinx_border  black_treat_white black_treat_white_border latinx_treat_black latinx_treat_black_border  latinx_treat_white latinx_treat_white_border ;
eststo bos2;
logit relocation_compassion border black latinx black_border latinx_border white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_border white_ingroup_border black_ingroup_border   white_treat_latinx white_treat_latinx_border   white_treat_black white_treat_black_border black_treat_latinx black_treat_latinx_border  black_treat_white black_treat_white_border latinx_treat_black latinx_treat_black_border  latinx_treat_white latinx_treat_white_border ;
eststo bos3;
logit relocation_relief border black latinx black_border latinx_border white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_border white_ingroup_border black_ingroup_border   white_treat_latinx white_treat_latinx_border   white_treat_black white_treat_black_border black_treat_latinx black_treat_latinx_border  black_treat_white black_treat_white_border latinx_treat_black latinx_treat_black_border  latinx_treat_white latinx_treat_white_border ;
eststo bos4;
logit relocation_love border black latinx black_border latinx_border white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_border white_ingroup_border black_ingroup_border   white_treat_latinx white_treat_latinx_border   white_treat_black white_treat_black_border black_treat_latinx black_treat_latinx_border  black_treat_white black_treat_white_border latinx_treat_black latinx_treat_black_border  latinx_treat_white latinx_treat_white_border ;
eststo bos5;
logit relocation_admiration border black latinx black_border latinx_border white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_border white_ingroup_border black_ingroup_border   white_treat_latinx white_treat_latinx_border   white_treat_black white_treat_black_border black_treat_latinx black_treat_latinx_border  black_treat_white black_treat_white_border latinx_treat_black latinx_treat_black_border  latinx_treat_white latinx_treat_white_border ;
eststo bos6;
logit relocation_joy  border black latinx black_border latinx_border white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_border white_ingroup_border black_ingroup_border   white_treat_latinx white_treat_latinx_border   white_treat_black white_treat_black_border black_treat_latinx black_treat_latinx_border  black_treat_white black_treat_white_border latinx_treat_black latinx_treat_black_border  latinx_treat_white latinx_treat_white_border ;
eststo bos7;
logit relocation_pride border black latinx black_border latinx_border white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_border white_ingroup_border black_ingroup_border   white_treat_latinx white_treat_latinx_border   white_treat_black white_treat_black_border black_treat_latinx black_treat_latinx_border  black_treat_white black_treat_white_border latinx_treat_black latinx_treat_black_border  latinx_treat_white latinx_treat_white_border ;
eststo bos8;
logit relocation_interest border black latinx black_border latinx_border white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_border white_ingroup_border black_ingroup_border   white_treat_latinx white_treat_latinx_border   white_treat_black white_treat_black_border black_treat_latinx black_treat_latinx_border  black_treat_white black_treat_white_border latinx_treat_black latinx_treat_black_border  latinx_treat_white latinx_treat_white_border ;
eststo bos9;
estout bos1 bos10 bos2 bos3 bos4 bos5 bos6 bos7 bos8 bos9  using emotion_border.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 

****Testing the Leaving Home during Emergency as a Mediating Effect***

#delimit;
gen black_emergency=black*q22;
gen latinx_emergency=latinx*q22;
gen latinx_ingroup_emergency= latinx_ingroup*q22;
gen black_treat_latinx_emergency=black_treat_latinx*q22;
gen white_treat_latinx_emergency=white_treat_latinx*q22;
gen white_ingroup_emergency= white_ingroup*q22;
gen black_treat_white_emergency=black_treat_white*q22;
gen latinx_treat_white_emergency=latinx_treat_white*q22;
gen black_ingroup_emergency= black_ingroup*q22;
gen latinx_treat_black_emergency=latinx_treat_black*q22;
gen white_treat_black_emergency=white_treat_black*q22;

***Table A33***

#delimit;
xi: oprobit q30 q22 black latinx black_emergency latinx_emergency white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_emergency white_ingroup_emergency black_ingroup_emergency   white_treat_latinx white_treat_latinx_emergency   white_treat_black white_treat_black_emergency black_treat_latinx black_treat_latinx_emergency  black_treat_white black_treat_white_emergency latinx_treat_black latinx_treat_black_emergency  latinx_treat_white latinx_treat_white_emergency ; 
eststo em1;
xi: oprobit q32 q22 black latinx black_emergency latinx_emergency white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_emergency white_ingroup_emergency black_ingroup_emergency   white_treat_latinx white_treat_latinx_emergency   white_treat_black white_treat_black_emergency black_treat_latinx black_treat_latinx_emergency  black_treat_white black_treat_white_emergency latinx_treat_black latinx_treat_black_emergency  latinx_treat_white latinx_treat_white_emergency ; 
eststo em2;
xi: oprobit q43_2 q22 black_ingroup latinx_ingroup latinx_ingroup_emergency white_ingroup_emergency black_ingroup_emergency white_treat_latinx white_treat_latinx_emergency   white_treat_black white_treat_black_emergency black_treat_latinx black_treat_latinx_emergency  black_treat_white black_treat_white_emergency latinx_treat_black latinx_treat_black_emergency  latinx_treat_white latinx_treat_white_emergency ; 
eststo em3;
xi: oprobit q43_3 q22 black_ingroup latinx_ingroup latinx_ingroup_emergency white_ingroup_emergency black_ingroup_emergency white_treat_latinx white_treat_latinx_emergency   white_treat_black white_treat_black_emergency black_treat_latinx black_treat_latinx_emergency  black_treat_white black_treat_white_emergency latinx_treat_black latinx_treat_black_emergency  latinx_treat_white latinx_treat_white_emergency ; 
eststo em4;
xi: oprobit q43_4 q22 black_ingroup latinx_ingroup latinx_ingroup_emergency white_ingroup_emergency black_ingroup_emergency white_treat_latinx white_treat_latinx_emergency   white_treat_black white_treat_black_emergency black_treat_latinx black_treat_latinx_emergency  black_treat_white black_treat_white_emergency latinx_treat_black latinx_treat_black_emergency  latinx_treat_white latinx_treat_white_emergency ; 
eststo em5;
xi: oprobit q43_5 q22 black_ingroup latinx_ingroup latinx_ingroup_emergency white_ingroup_emergency black_ingroup_emergency white_treat_latinx white_treat_latinx_emergency   white_treat_black white_treat_black_emergency black_treat_latinx black_treat_latinx_emergency  black_treat_white black_treat_white_emergency latinx_treat_black latinx_treat_black_emergency  latinx_treat_white latinx_treat_white_emergency ; 
eststo em6;
xi: reg ingroup_p q22 black latinx black_emergency latinx_emergency white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_emergency white_ingroup_emergency black_ingroup_emergency   white_treat_latinx white_treat_latinx_emergency   white_treat_black white_treat_black_emergency black_treat_latinx black_treat_latinx_emergency  black_treat_white black_treat_white_emergency latinx_treat_black latinx_treat_black_emergency  latinx_treat_white latinx_treat_white_emergency ; 
eststo em7;
xi: reg tolerance q22 black latinx black_emergency latinx_emergency white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_emergency white_ingroup_emergency black_ingroup_emergency   white_treat_latinx white_treat_latinx_emergency   white_treat_black white_treat_black_emergency black_treat_latinx black_treat_latinx_emergency  black_treat_white black_treat_white_emergency latinx_treat_black latinx_treat_black_emergency  latinx_treat_white latinx_treat_white_emergency ; 
eststo em8;
estout em1 em2 em3 em4 em5 em6 em7 em8  using emergency.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 

***Table A34***

#delimit;
logit relocation_fear q22 black latinx black_emergency latinx_emergency white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_emergency white_ingroup_emergency black_ingroup_emergency   white_treat_latinx white_treat_latinx_emergency   white_treat_black white_treat_black_emergency black_treat_latinx black_treat_latinx_emergency  black_treat_white black_treat_white_emergency latinx_treat_black latinx_treat_black_emergency  latinx_treat_white latinx_treat_white_emergency ;
eststo eme1;
logit relocation_disappointment q22 black latinx black_emergency latinx_emergency white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_emergency white_ingroup_emergency black_ingroup_emergency   white_treat_latinx white_treat_latinx_emergency   white_treat_black white_treat_black_emergency black_treat_latinx black_treat_latinx_emergency  black_treat_white black_treat_white_emergency latinx_treat_black latinx_treat_black_emergency  latinx_treat_white latinx_treat_white_emergency ;
eststo eme10;
logit relocation_sadness q22 black latinx black_emergency latinx_emergency white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_emergency white_ingroup_emergency black_ingroup_emergency   white_treat_latinx white_treat_latinx_emergency   white_treat_black white_treat_black_emergency black_treat_latinx black_treat_latinx_emergency  black_treat_white black_treat_white_emergency latinx_treat_black latinx_treat_black_emergency  latinx_treat_white latinx_treat_white_emergency ;
eststo eme2;
logit relocation_compassion q22 black latinx black_emergency latinx_emergency white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_emergency white_ingroup_emergency black_ingroup_emergency   white_treat_latinx white_treat_latinx_emergency   white_treat_black white_treat_black_emergency black_treat_latinx black_treat_latinx_emergency  black_treat_white black_treat_white_emergency latinx_treat_black latinx_treat_black_emergency  latinx_treat_white latinx_treat_white_emergency ;
eststo eme3;
logit relocation_relief q22 black latinx black_emergency latinx_emergency white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_emergency white_ingroup_emergency black_ingroup_emergency   white_treat_latinx white_treat_latinx_emergency   white_treat_black white_treat_black_emergency black_treat_latinx black_treat_latinx_emergency  black_treat_white black_treat_white_emergency latinx_treat_black latinx_treat_black_emergency  latinx_treat_white latinx_treat_white_emergency ;
eststo eme4;
logit relocation_love q22 black latinx black_emergency latinx_emergency white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_emergency white_ingroup_emergency black_ingroup_emergency   white_treat_latinx white_treat_latinx_emergency   white_treat_black white_treat_black_emergency black_treat_latinx black_treat_latinx_emergency  black_treat_white black_treat_white_emergency latinx_treat_black latinx_treat_black_emergency  latinx_treat_white latinx_treat_white_emergency ;
eststo eme5;
logit relocation_admiration q22 black latinx black_emergency latinx_emergency white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_emergency white_ingroup_emergency black_ingroup_emergency   white_treat_latinx white_treat_latinx_emergency   white_treat_black white_treat_black_emergency black_treat_latinx black_treat_latinx_emergency  black_treat_white black_treat_white_emergency latinx_treat_black latinx_treat_black_emergency  latinx_treat_white latinx_treat_white_emergency ;
eststo eme6;
logit relocation_joy  q22 black latinx black_emergency latinx_emergency white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_emergency white_ingroup_emergency black_ingroup_emergency   white_treat_latinx white_treat_latinx_emergency   white_treat_black white_treat_black_emergency black_treat_latinx black_treat_latinx_emergency  black_treat_white black_treat_white_emergency latinx_treat_black latinx_treat_black_emergency  latinx_treat_white latinx_treat_white_emergency ;
eststo eme7;
logit relocation_pride q22 black latinx black_emergency latinx_emergency white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_emergency white_ingroup_emergency black_ingroup_emergency   white_treat_latinx white_treat_latinx_emergency   white_treat_black white_treat_black_emergency black_treat_latinx black_treat_latinx_emergency  black_treat_white black_treat_white_emergency latinx_treat_black latinx_treat_black_emergency  latinx_treat_white latinx_treat_white_emergency ;
eststo eme8;
logit relocation_interest q22 black latinx black_emergency latinx_emergency white_ingroup black_ingroup  latinx_ingroup latinx_ingroup_emergency white_ingroup_emergency black_ingroup_emergency   white_treat_latinx white_treat_latinx_emergency   white_treat_black white_treat_black_emergency black_treat_latinx black_treat_latinx_emergency  black_treat_white black_treat_white_emergency latinx_treat_black latinx_treat_black_emergency  latinx_treat_white latinx_treat_white_emergency ;
eststo eme9;
estout eme1 eme10 eme2 eme3 eme4 eme5 eme6 eme7 eme8 eme9  using emotion_emergency.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g))  legend label collabels(none) varlabels(_cons Constant) style(tex); 

******************

